/********************************
 creater:
 create time:2015-12-31
 describe：拦截器
 modify time:
 ********************************/
/*网络图片拦截器*/
APP.filter('ImageFilter', ['UrlService', function (UrlService) {
  return function (value) {
    //要过滤的图片地址
    var oldUrl = value;
    //过滤图片地址不存在或为空显示默认图片地址
    var newUrl = 'head.png';
    if (oldUrl != null && oldUrl != '') {
      newUrl = oldUrl;
      var head = newUrl.slice(0, 4);
      return (head == 'http' || head == 'data' ? '' : UrlService.getServer('imageServer')) + newUrl;
    } else {
      return "./img/" + newUrl;
    }
  }
}]);
